﻿using System;

namespace Capitalize
{
    class Program
    {
        static void Main(string[] args)
        {
            string s;

            int n1 = 0, n2 = 0;

            Console.WriteLine("请输入一个字符串");

            s = Console.ReadLine();

            foreach (char c in s)

            {
                if (c >= 'A' && c <= 'Z')

                    n1++;

                else if (c >= 'a' && c <= 'z')

                    n2++;

                else

                    continue;

            }

            Console.WriteLine("大写字母有{0}个，小写字母有{1}个", n1, n2);
            Console.ReadKey();
        }
    }
}
